package com.panshi.service.impl;

import com.panshi.dao.IEssayDao;
import com.panshi.domain.Essay;
import com.panshi.service.IEssayService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class EssayService implements IEssayService {

    @Autowired
    private IEssayDao iEssayDao;

    @Override
    public List<Essay> queryDynamicIdEssay(long userId) {
        List<Essay> essayList = iEssayDao.queryDynamicIdEssay(userId);
        return essayList;
    }

    @Override
    public Essay queryEssayById(long essayId) {
        return iEssayDao.queryEssayById(essayId);
    }

    @Override
    public void updateReadNumEssayById(long essayId) {
        iEssayDao.updateReadNumEssayById(essayId);
    }

}
